package com.linghang.association.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
//离线消息实体类
public class Message {
    private Integer id;

    private String username;

    private String message;

    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Message(String username, String message, Date createTime) {
        this.username = username;
        this.message = message;
        this.createTime = createTime;
    }

    public Message(Integer id, String username, String message, Date createTime) {
        this.id = id;
        this.username = username;
        this.message = message;
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", message=").append(message);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }
}